# Maintainer: Jens Reidel <adrian@travitia.xyz>
pkgname=qrtr
pkgver=1.1
pkgrel=0
pkgdesc="Userspace reference for net/qrtr in the Linux kernel"
url="https://github.com/linux-msm/qrtr"
arch="all"
license="BSD-3-Clause"
depends_dev="linux-headers"
makedepends="$depends_dev meson"
subpackages="$pkgname-doc $pkgname-dev $pkgname-libs"
source="
	https://github.com/linux-msm/qrtr/archive/v$pkgver/qrtr-v$pkgver.tar.gz
	0001-lib-meson.build-restore-libqrtr-SONAME.patch
"
options="!check" # no tests

build() {
	abuild-meson \
		-Dqrtr-ns=disabled \
		-Dsystemd-service=disabled \
		. output
	meson compile -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output

	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

sha512sums="
68cc8731d500b2e7f5702471a3c239f415bd97035678d972d40d28ceb58bcaa1ee271816fd2002776a2d370611fc9e5e54a79d1a16ce2bce258b9411d9aec824  qrtr-v1.1.tar.gz
a85ce27dff447f383a8587a1ddca9ea2c7a8e5b8cd3b171901073dfd52353d8343b85e81740f12167046ae33d03ac62eaafe583c88990702d769e5d9c3b27cd9  0001-lib-meson.build-restore-libqrtr-SONAME.patch
"
